# Maintainer: Balló György <ballogyor+arch at gmail dot com>

pkgname=gnome-subtitles
pkgver=1.7.2
pkgrel=1
pkgdesc='Video subtitle editor for GNOME'
arch=('loong64' 'x86_64')
url='http://www.gnomesubtitles.org/'
license=('GPL2')
depends=('gst-plugin-gtk' 'gst-plugins-base' 'gtk-sharp-3' 'gtkspell3')
makedepends=('intltool' 'itstool')
optdepends=('gst-plugins-good: Extra media codecs'
            'gst-plugins-bad: Extra media codecs'            
            'gst-plugins-ugly: Extra media codecs'
            'gst-libav: Extra media codecs')
source=("https://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz")
sha256sums=('b6bf327998a7863335d9fb4281d18e0e73f3c4f55f56ba06554df859b31804c7')

prepare() {
  cd $pkgname-$pkgver
  sed -i 's/libenchant.so.1/libenchant-2.so.2/' src/GnomeSubtitles/Execution/gnome-subtitles.exe.config
}

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr --disable-schemas-compile
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}
